package com.example.Administrator.shoujiweishi.utils;

import android.app.Activity;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/6/9 0009.
 */

public class ActivityCollecter {
    public static List<Activity> list =new ArrayList<>();
    public static void AddAvtivity(Activity activity){
        list.add(activity);
    }
    public static void removeActivity(Activity activity){
        list.remove(activity);
    }
    public static void finishAll(){
        for (Activity activity: list) {
            if (!activity.isFinishing()){
                activity.finish();
            }
        }
    }
}
